import React, { Component } from 'react'

class Main extends Component {
    render() { 
        let { list, i } = this.props
        return (
            <div className='items'>
                {
                    list && list.length ? list[i].children.map((item,index) => {
                        return (
                            <div key={index}>
                                <img src={item.img} alt=''/>
                                <h3>{item.title}</h3>
                                <p>{item.word}</p>
                            </div>
                        )
                    }) : <div>暂无数据</div>
                }
            </div>
        )
    }
}
 
export default Main